<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>旅行社信息</title>
<link href="<s:url value="/resources/css/info.css"/>" rel="stylesheet" type="text/css" />
<link href="<s:url value='/resources/css/control.theme.css'/>" rel="stylesheet" type="text/css"/>
<script src="<s:url value='/resources/js/jquery/jquery-1.5.2.min.js'/>" type="text/javascript"></script>
<script src="<s:url value='/resources/js/common/info.create.js'/>" type="text/javascript"></script>
<script type="text/javascript">
	var contextpath = "<%= request.getContextPath() %>";//上下文
	
	var plaint = <s:property value="#request.plaint" escape="false"/>;
	
	$(function(){
		$(window).error(function(msg){
			alert('脚本运行错误，请刷新重试！');
		}); 
		var groupicon = '<s:url value="/resources/images/communication.gif"/>';
		
		var fields = [
	            	{display: "行程名称", value: plaint.tourName, newline: true, group: "行程单号："+plaint.tourCode, groupicon: groupicon}, 
	            	{display: "组团旅行社", value: plaint.travelName, newline: false},
	            	{display: "投诉人姓名", value: plaint.toursitName, newline: true},
	            	{display: "联系电话", value: plaint.phone, newline: false},
	            	{display: "投诉时间", value: plaint.time, newline: true}
	            ];
		//var citemVal = ['','解说不清','态度冷漠','解说不清'];
		if(plaint.compGuide && plaint.compGuide.length != 0){
			for(var x in plaint.compGuide){
				guide = plaint.compGuide[x];
				if(x == 0){
					fields.push({display: "导游姓名", value: guide.name, newline: true, group: "投诉导游", groupicon: groupicon}); 
				}else{
					fields.push({display: "导游姓名", value: guide.name, newline: true}); 
				}
				fields.push({display: "导游联系电话", value: guide.phone, newline: false});
				fields.push({display: "投诉理由", value: guide.citemVal, newline: true, width: 400});
			}
		}
		if(plaint.compPlace && plaint.compPlace.length != 0){
			for(var x in plaint.compPlace){
				place = plaint.compPlace[x];
				if(x == 0){
					fields.push({display: "场所名称", value: place.placeName, newline: true, group: "投诉场所", groupicon: groupicon}); 
				}else{
					fields.push({display: "场所名称", value: place.placeName, newline: true}); 
				}
				fields.push({display: "投诉理由", value: place.citemVal, newline: false});
			}
		}
		$('#nav_cont').createInfo({
            valueWidth: 200, labelWidth: 120, space: 40, labelAlign:'right',fields:fields
        });
	});
</script>
</head>
<body style="margin: 0;padding: 0; background:#f3f9ff;">
<div class="right clear" style="margin: 0 10px;">
	<div id="nav_cont">
	
	</div>
	<div style="font-size: 14px; padding:5px 10px; list-style: none; clear: both;"><a href="<s:url value="/control/showComplaints.do"/>">点击返回</a></div>
</div>
</body>
</html>